<html>
<head>
    <title>Steps of setup for CDS Performance testing</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<br><center><H1>Steps of setup for CDS Performance testing</H1></center>

<B>Reference :</B>
<br><a href="cdsperf/CDS_Performance_testing_tool.html">CDS_Performance_testing_tool.html</a>
<br><a href="http://jalapi.sfbay.sun.com/wiki/space/Phoenix+Engineering/Requirements/Performance+Tuning/CDS_Performance_testing_tool">http://jalapi.sfbay.sun.com/wiki/space/Phoenix+Engineering/Requirements/Performance+Tuning/CDS_Performance_testing_tool</a>

<br id="single">
<br><H3>1. Hardware and software</H3>
<table border="1">
    <tr>
        <td><H3>Host inforation</H3></td>
        <td>
            <table border="1">
                <tr>
                    <td> - </td>
                    <td>CDSServer</td>
                    <td>DBServer</td>
                </tr>
                <tr>
                    <td>MEM</td>
                    <td>2G</td>
                    <td>2G</td>
                </tr>
                <tr>
                    <td>Harddisk</td>
                    <td>20G</td>
                    <td>40G</td>
                </tr>
                <tr>
                    <td>Hostname</td>
                    <td>cln204</td>
                    <td>CDSDBServer</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td><H3>Soft inforation</H3></td>
        <td>
            <table border="1">
                <tr>
                    <td> - </td>
                    <td>CDSServer</td>
                    <td>DBServer</td>
                </tr>
                <tr>
                    <td>OS</td>
                    <td>Solaris 10 u4 sparc</td>
                    <td>-</td>
                </tr>
                <tr>
                    <td>Application Server</td>
                    <td>Application Server 9.0_01</td>
                    <td>-</td>
                </tr>
                <tr>
                    <td>jdk</td>
                    <td>jdk1.5_11</td>
                    <td>-</td>
                <tr>
                    <td>CDS</td>
                    <td>cds build. (cds51ga)</td>
                    <td>-</td>
                </tr>
                <tr>
                    <td>Oracle</td>
                    <td>-</td>
                    <td>Oracle 10.2</td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<td><H3>2. Install DB</H3>
<table border="1">
    <tr align="center">
        <td><H4>Variable</H4></td>
        <td><H4>Value   </H4></td>
    </tr>
    <tr>
        <td>ORACLE_SID</td>
        <td>ora10gu8</td>
    </tr>
    <tr>
        <td>NLS_LANG</td>
        <td>AMERICAN_AMERICA.AL32UTF8</td>
    </tr>
</table>
<br><B>Note :</B>
<br>1. "NLS_LANG" must be set "AMERICAN_AMERICA.AL32UTF8"
<br>2. The Code of database must be choose "AL32UTF8"
<br>3. There is more than 20G free space on hard disk  for oracle
<br>4. Must start Listener
<br>
<br><H3>3 Install JDK</H3>
<br> Path of JDK : $cds_base/jdk1.5.0_11
<br>
<br><H3>4 Install Application Server</H3>
<br> Path of Application Server : $cds_base/SUNWas
<br>
<br><H3>5 create content web service</H3>
<br>(1) Start a web service on "80" port.
<br>(2) Append "x.x.x.x csgweb.sfbay.sun.com" to "host" file on cdsserver
<br>

<br><H3>6. Setup for CDS Performance</H3>
<br><B>6.1 Environment</B>
<table border="1">
    <tr align="center">
        <td><H4>soft    </H4></td>
        <td><H4>Variable</H4></td>
        <td><H4>Value   </H4></td>
    </tr>
    <tr>
        <td>Workspace</td>
        <td>cds_base</td>
        <td>/workspace/whg/workspace</td>
    </tr>
    <tr>
        <td>CDS Installation Path</td>
        <td>CDS_HOME</td>
        <td>$cds_base/trunk </td>
    </tr>
    <tr>
        <td>Jdk</td>
        <td>JAVA_HOME</td>
        <td>$cds_base/jdk1.5.0_11</td>
    </tr>
    <tr>
        <td>Application Server Path</td>
        <td>-</td>
        <td>$cds_base/SUNWas</td>
    </tr>
    <tr>
        <td>Tools path</td>
        <td>CDS_TOOLS</td>
        <td>$cds_base/dependencies</td>
    </tr>
    <tr>
        <td>Other</td>
        <td>PATH</td>
        <td>$CDS_HOME/bin:$CDS_HOME/tools:$PATH </td>
    </tr>
</table>
<br><B>6.2 Set Environment </B>
<br>[root@cln204 /]# <B><em class="firstterm">export cds_base=/workspace/whg/workspace</em></B>
<br>[root@cln204 /]# <B><em class="firstterm">export CDS_HOME=$cds_base/trunk</em></B>
<br>[root@cln204 /]# <B><em class="firstterm">export CDS_TOOLS=$cds_base/dependencies</em></B>
<br>[root@cln204 /]# <B><em class="firstterm">export PATH=$CDS_HOME/bin:$CDS_HOME/tools:$PATH </em></B>
<br>
<br><B>6.3 Build </B>
<br>[root@cln204 /]# <B><em class="firstterm">cd $CDS_HOME/bin</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/bin]# <B><em class="firstterm">vi <a target="_blank" href="cdsperf/init_env.sh">init_env.sh</a></em></B>
<table border="1">
    <tr align="center">
        <td><H4>Variable</H4></td>
        <td><H4>Value   </H4></td>
    </tr>
<tr><td>JAVA_HOME                        </td><td>/workspace/whg/jdk1.5.0_11</td></tr>
<tr><td>SUN_AS_HOME                      </td><td>/workspace/whg/SUNWas</td></tr>
</table>
<br>[root@cln204 /workspace/whg/workspace/trunk/bin]# <B><em class="firstterm">cdst cleanall</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/bin]# <B><em class="firstterm">cdst buildall</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/bin]# <B><em class="firstterm">cd $CDS_HOME/modules/</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules]# <B><em class="firstterm">cdst build internal/perftest</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules]# <B><em class="firstterm">cd $CDS_HOME/modules/internal/perftest/src/scripts/cdsadmin</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsadmin]# <B><em class="firstterm">./cdsa pack</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsadmin]# <B><em class="firstterm">chmod 777 $CDS_HOME/toolpack.zip</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsadmin]# <B><em class="firstterm">ls -l $CDS_HOME/toolpack.zip</em></B>
<br>(Here, verify toolpack.zip  is existed)
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsadmin]# <B><em class="firstterm">cd $CDS_HOME/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts]# <B><em class="firstterm">vi <a target="_blank" href="cdsperf/env.sh">env.sh</a></em></B>
<br>
<table border="1">
    <tr align="center">
        <td><H4>Variable</H4></td>
        <td><H4>Value   </H4></td>
    </tr>
<tr><td>CDS_RELEASE                      </td><td>/workspace/whg/release/Sun_Java_System_Content_Delivery_Server_5.1_ga.zip</td></tr>
<tr><td>CDS_HOME_PARENT                  </td><td>/workspace/whg/deployment</td></tr>
<tr><td>BINARY                           </td><td>"Sun_Java_System_Content_Delivery_Server*"</td></tr>
<tr><td>CDSA_TOOLS                       </td><td>/workspace/whg/workspace/trunk/toolpack.zip</td></tr>
<tr><td>PERFTEST_JAR                     </td><td>/workspace/whg/workspace/trunk/modules/internal/perftest/dist/perftest.jar</td></tr>
<tr><td>ANT_HOME                         </td><td>/workspace/whg/workspace/dependencies/tools/apache-ant-1.7.0</td></tr>
<tr><td>DEPLOYMENT_NAME                  </td><td>cds</td></tr>
<tr><td>APP_SERVER                       </td><td>sn</td></tr>
<tr><td>CDS_HOST                         </td><td>cln204</td></tr>
<tr><td>PORT                             </td><td>7070</td></tr>
<tr><td>BEA_HOME                         </td><td>/opt</td></tr>
<tr><td>WL_HOME                          </td><td>${BEA_HOME}</td></tr>
<tr><td>JAVA_HOME                        </td><td>/workspace/whg/jdk1.5.0_11</td></tr>
<tr><td>SUN_AS_HOME                      </td><td>/workspace/whg/SUNWas</td></tr>
<tr><td>JMS                              </td><td>Server</td></tr>
<tr><td>ORACLE_HOST                      </td><td>dbserver</td></tr>
<tr><td>ORACLE_PORT                      </td><td>1521</td></tr>
<tr><td>ORACLE_SID                       </td><td>ora10gu8</td></tr>
<tr><td>ORACLE_SYS_USER                  </td><td>system</td></tr>
<tr><td>ORACLE_SYS_PASSWD                </td><td>oracle</td></tr>
<tr><td>ORACLE_VERSION                   </td><td>10g</td></tr>
<tr><td>ORACLE_SERVER_ID                 </td><td>DBServer1</td></tr>
<tr><td>PREFIX                           </td><td>whg72setup</td></tr>
<tr><td>ONESTEP                          </td><td>95</td></tr>
<tr><td>TWOSTEP                          </td><td>1</td></tr>
<tr><td>SUB_BASE                         </td><td>1000000</td></tr>
<tr><td>SUB_PREFIX                       </td><td>sub</td></tr>
<tr><td>SUB_COUNT                        </td><td>2000000</td></tr>
<tr><td>WIDTH                            </td><td>6</td></tr>
<tr><td>DEPTH                            </td><td>3</td></tr>
<tr><td>CONTENT_SAMPLES                  </td><td>1</td></tr>
<tr><td>CAT_SIZE                         </td><td>1</td></tr>
<tr><td>PUBLISH                          </td><td>WIDTH**DEPTH </td></tr>
<tr><td>MULTIPLIER                       </td><td>32</td></tr>
<tr><td>CDS_REG                          </td><td>"$CDS_HOME/cfg/registry"</td></tr>
</table>
<br><B>Note :</B>
<br>(1) JMS 
<table border="1">
<tr><td>If "APP_SERVER=sn"</td><td>"JMS=server"</td></tr>
<tr><td>If "APP_SERVER=wl"</td><td>"JMS=client"</td></tr>
</table>
<br>(2) PREFIX
<br> You must modify the value of "PREFIX" before the new setup for CDS Performance
<br>
<br><B>6.4 prepare setup</B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts]# <B><em class="firstterm">./preparel.sh</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts]# <B><em class="firstterm">cp /workspace/whg/workspace/trunk/dist/cds/lib/external/ojdbc14.jar /workspace/whg/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/dist/cds/lib</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts]# <B><em class="firstterm">cp /workspace/whg/workspace/trunk/dist/cds/lib/external/ojdbc14.jar /workspace/whg/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/dist/cds/lib/external</em></B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts]# <B><em class="firstterm">find /workspace/whg/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/dist/cds/lib -name "ojdbc14.jar"</em></B>
<br>(Here, verify "ojdbc14.jar" are existed)
<br>/workspace/whg/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/dist/cds/lib/external/ojdbc14.jar
<br>/workspace/whg/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/dist/cds/lib/ojdbc14.jar 
<br>
<br><B>6.5 Execute the script "setupl.sh"</B>
<br>[root@cln204 /workspace/whg/workspace/trunk/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts]# <B><em class="firstterm">./setupl.sh </em></B>
<br>

<br><B>6.6 Setup for DB</B>
<br><B>6.6.1 Copy sql files and script files to DBServer</B>
<br>export CDS_HOME=/workspace/whg/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga 
<br>Copy $CDS_HOME/modules/internal/perftest/src/scripts/cdsadmin/&lt;prefix_ps.sql&gt; to &lt;Oracle_Host&gt;
<br>Copy $CDS_HOME/modules/internal/perftest/src/scripts/cdsadmin/&lt;prefix_vs.sql&gt; to &lt;Oracle_Host&gt;
<br>Copy $CDS_HOME/modules/internal/perftest/src/scripts/subscribergen to &lt;Oracle_Host&gt; 
<br>
<br><B>6.6.2 execute sql and script</B>
<br>[oracle@CDSDBServer ~]$ <B><em class="firstterm">sqlplus /nolog</em></B>
<br>SQL> <B><em class="firstterm">connect / as sysdba</em></B>
<br>SQL> <B><em class="firstterm">grant connect , resource to whg72setup_ps_owner identified by cdsperf;</em></B>
<br>SQL> <B><em class="firstterm">grant connect , resource to whg72setup_vs_owner identified by cdsperf;</em></B>
<br>SQL> <B><em class="firstterm">connect whg72setup_vs_owner/cdsperf</em></B>
<br>SQL> <B><em class="firstterm">@whg72setup_vs</em></B>
<br>SQL> <B><em class="firstterm">connect whg72setup_ps_owner/cdsperf</em></B>
<br>SQL> <B><em class="firstterm">@whg72setup_ps</em></B>
<br>[oracle@CDSDBServer ~]$ <B><em class="firstterm">tar xvf subscribergen.tar</em></B>
<br>[oracle@CDSDBServer ~]$ <B><em class="firstterm">cd subscribergen</em></B>
<br>[oracle@CDSDBServer ~/subscribergen]$ <B><em class="firstterm">./frontend.sh </em></B>
<br>

<br><B>6.7 Rebuild Solar Indexes</B>
<br>CM rebuild URL : <B><em class="firstterm">http://cln204:7070/admin/main/search_update?action=rebuild</em></B>
<br>VM rebuild URL : <B><em class="firstterm">http://cln204:7070/vsadmin/main/search_update?action=rebuild</em></B>
<br>CM clean URL : <B><em class="firstterm">http://cln204:7070/admin/main/search_update?action=delete_all</em></B>
<br>VM clean URL : <B><em class="firstterm">http://cln204:7070/vsadmin/main/search_update?action=delete_all</em></B>
<br><B>Note :</B>
<br> You must login "http://cln204:7070/admin" as "admin" and "http://cln204:7070/vsadmin" as "admin" before you execute the up URL.
<br>
<br>
<br>
<br>
</body>
</html>